/*
 * Copyright (C) 2016-2017 AnStudio
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.astudio.lhasa.constants;

public class InterpreterError {
    public static final int INTERPRETER_ERROR_SPEECH_RECOGNIZE_SERVER_UNREACHABLE = 1;
    public static final int INTERPRETER_ERROR_SPEECH_RECOGNIZE_ERROR = 2;
    public static final int INTERPRETER_ERROR_TRANSLATE_COMMON_ERROR = 3;
    public static final int INTERPRETER_ERROR_TRANSLATE_SERVER_UNREACHABLE = 4;
    public static final int INTERPRETER_ERROR_TRANSLATE_INVALID_SOURCE_LANGUAGE = 5;
    public static final int INTERPRETER_ERROR_TRANSLATE_INVALID_DESTINATION_LANGUAGE = 6;
    public static final int INTERPRETER_ERROR_TRANSLATE_NOT_INITIALIZED = 7;

    public static final int INTERPRETER_ERROR_FIRST
            = INTERPRETER_ERROR_SPEECH_RECOGNIZE_SERVER_UNREACHABLE;
    public static final int INTERPRETER_ERROR_LAST
            = INTERPRETER_ERROR_TRANSLATE_NOT_INITIALIZED;

    public static String getErrorMsg(int errNo) {
        if (errNo < INTERPRETER_ERROR_FIRST || errNo > INTERPRETER_ERROR_LAST) {
            return null;
        }

        return "";
    }
}
